﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<MiniBug.Entity.Bug>>" %>

    <table>
        <tr>
            <th>
                <%: Html.CheckBox("Select") %>
            </th>
            <th>
                
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldTitle %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldDescription %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldOpenDate %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldCloseDate %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldProject %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldCategory %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldStatus %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldPriority %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldOwner %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldEstimatedTime %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldActualTime %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldDueTo %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldComponent %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldNumber %>
            </th>
            <th>
                <%=ResourceViews.BugStrings.FieldAssignedTo %>
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
        <td>
        <%: Html.CheckBox("Select") %>
        </td>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.idBug }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.idBug })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.idBug })%>
            </td>

            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.OpenDate) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CloseDate) %>
            </td>
            <td>
                <%: item.Project.Name %>
            </td>
            <td>
                <%: item.idCategory %>
            </td>
            <td>
                <%: item.StatusString %>
            </td>
            <td>
                <%: item.Priority.Label %>
            </td>
            <td>
                <%: item.Owner.Name %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EstimatedTime) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.ActualTime) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.DueDate) %>
            </td>
            <td>
                <%: item.Component %>
            </td>
            <td>
                <%: item.Number %>
            </td>
            <td>
                <%: item.AssignedTo.Name %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink(ResourceViews.BugStrings.CreateLabel, "Create", "Bug") %>
    </p>


